import Layout from '@/pages/public/layout' // 公共部分

const paper = [{
  path: '/exam/paper',
  component: Layout,
  children: [{
    path: 'list',
    component: () => import('@/pages/exam/paper/index.vue'),
    meta: {
      title: '试卷管理',
      permission: 'exam.paper.list'
    }
  }, {
    path: 'config',
    component: () => import('@/pages/exam/paper/config.vue'),
    meta: {
      title: '监考配置',
      permission: 'exam.paper.config'
    }
  }, {
    path: 'settled/create',
    component: () => import('@/pages/exam/paper/settled/create.vue'),
    meta: {
      title: '新建固定试卷',
      permission: 'exam.paper.create'
    }
  }, {
    path: 'settled/:id/edit',
    component: () => import('@/pages/exam/paper/settled/edit.vue'),
    meta: {
      title: '编辑固定试卷',
      permission: 'exam.paper.edit'
    }
  }, {
    path: 'settled/:id/details',
    component: () => import('@/pages/exam/paper/settled/details.vue'),
    meta: {
      title: '固定试卷详情',
      permission: 'exam.paper.list'
    }
  }, {
    path: 'settled/:id/record',
    component: () => import('@/pages/exam/paper/settled/record.vue'),
    meta: {
      title: '考试记录',
      permission: 'exam.paper.record'
    }
  }, {
    path: 'settled/:id/record/:record_id(\\d+)/details',
    component: () => import('@/pages/exam/paper/settled/recordDetails.vue'),
    meta: {
      title: '考试记录 - 详情',
      permission: 'exam.paper.record'
    }
  }, {
    path: 'random/create',
    component: () => import('@/pages/exam/paper/random/create.vue'),
    meta: {
      title: '新建随机试卷',
      permission: 'exam.paper.create'
    }
  }, {
    path: 'random/:id/edit',
    component: () => import('@/pages/exam/paper/random/edit.vue'),
    meta: {
      title: '编辑随机试卷',
      permission: 'exam.paper.edit'
    }
  }, {
    path: 'random/:id/details',
    component: () => import('@/pages/exam/paper/random/details.vue'),
    meta: {
      title: '随机试卷详情',
      permission: 'exam.paper.list'
    }
  }, {
    path: 'category',
    component: () => import('@/pages/exam/paper/category/index.vue'),
    meta: {
      title: '分类',
      permission: 'exam.paper.category.list'
    }
  }, {
    path: 'random/:id/record',
    component: () => import('@/pages/exam/paper/random/record.vue'),
    meta: {
      title: '考试记录',
      permission: 'exam.paper.record'
    }
  }, {
    path: 'random/:id/record/:record_id(\\d+)/details',
    component: () => import('@/pages/exam/paper/random/recordDetails.vue'),
    meta: {
      title: '考试记录 - 详情',
      permission: 'exam.paper.record'
    }
  }, {
    path: ':id/student',
    component: () => import('@/pages/exam/paper/student'),
    meta: {
      title: '试卷 - 学员',
      permission: 'exam.paper.record'
    }
  }]
}]

export default paper
